<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="/layout/admin_template.xhtml">

    <ui:define name="body">
    	<h:form>
    		<rich:panel>
    			<f:facet name="header"></f:facet>
	    		<h:commandButton value="#{messages.back_msg}" action="news" immediate="true"/>
	    		<rich:spacer width="10" />
	    		<h:commandButton value="#{messages.save_msg}" action="#{kNewsManager.save()}" />
	    		<br />
	    		<table>
	    			<tr>
	    				<td>
	    					<h:outputText value="#{messages.start_msg}" />
	    				</td>
	    				<td>
	    					<rich:calendar value="#{kNewsManager.news.start}"  showWeeksBar="false"/>
	    				</td>
	    			</tr>
	    			<tr>
	    				<td>
	    					<h:outputText value="#{messages.end_msg}" />
	    				</td>
	    				<td>
	    					<rich:calendar value="#{kNewsManager.news.end}" showWeeksBar="false" />
	    				</td>
	    			</tr>
	    			<tr>
	    				<td>
	    					<h:outputText value="#{messages.active_msg}" />
	    				</td>
	    				<td>
	    					<h:selectBooleanCheckbox value="#{kNewsManager.news.active}" />
	    				</td>
	    			</tr>
	    		</table>
	    		<table>
	    			<tr>
	    				<td>
	    					<rich:tabPanel switchType="client" selectedTab="short_en">
						   		<rich:tab name="short_en" label="#{messages.lang_en_msg}" >
						   			<table>
						    			<tr>
						    				<td>
						    					<h:outputText value="#{messages.short_msg}" />
						    					<span class="m">*</span>
						    				</td>
						    				<td>
						    					<h:inputTextarea value="#{kNewsManager.news.short_en}" rows="2" cols="40" required="true" />
						    				</td>
						    			</tr>
						    		</table>
						   		</rich:tab>
						   		<rich:tab name="short_sr" label="#{messages.lang_sr_msg}">
						   			<table>
						    			<tr>
						    				<td>
						    					<h:outputText value="#{messages.short_msg}" />
						    				</td>
						    				<td>
						    					<h:inputTextarea value="#{kNewsManager.news.short_sr}" rows="2" cols="40" />
						    				</td>
						    			</tr>
						    		</table>
						   		</rich:tab>
						   		<rich:tab name="short_es" label="#{messages.lang_es_msg}" >
						   			<table>
						    			<tr>
						    				<td>
						    					<h:outputText value="#{messages.short_msg}" />
						    				</td>
						    				<td>
						    					<h:inputTextarea value="#{kNewsManager.news.short_es}" rows="2" cols="40" />
						    				</td>
						    			</tr>
						    		</table>
						   		</rich:tab>
						   	</rich:tabPanel>
	    				</td>
	    			</tr>
	    			<tr>
	    				<td>
				    		<ui:include src="/pages/in/k_translate.xhtml" >
				    			<ui:param name="item" value="#{kNewsManager.news}" />
				    		</ui:include>
	    				</td>
	    			</tr>
	    		</table>
    		</rich:panel>
    	</h:form>
    </ui:define>
</ui:composition>
